package pw.goyd.game.logic;

import pw.goyd.game.model.Card;
import pw.goyd.protocol.core.Serializer;

import java.util.List;

/**
 * 发牌包
 *
 * @author StanWind
 */
public class DispatchResponse extends Serializer {
    private List<Card> cards;

    public List<Card> getCards() {
        return cards;
    }

    public void setCards(List<Card> cards) {
        this.cards = cards;
    }


    @Override
    protected void read() {


    }

    @Override
    protected void write() {
        //牌的张数
        writeByte((byte) cards.size());
        for (Card c : cards) {
            writeByte((byte) c.getWeight());
            writeByte((byte) c.getSuit());
        }

    }

}
